package com.awt.layoutManager;

import java.awt.*;

/**
 * @authoer zsj
 * @date 2023/4/15 12:49
 */
public class BorderLayoutDemo
{
    public static void main(String[] args) {
        Frame frame = new Frame("border_layout_demo");
        frame.setLayout(new BorderLayout(30,10));

        frame.add(new Button("北侧按钮"),BorderLayout.NORTH);
        frame.add(new Button("东侧按钮"),BorderLayout.EAST);
//        frame.add(new Button("西侧按钮"),BorderLayout.WEST);
        frame.add(new Button("南侧按钮"),BorderLayout.SOUTH);


        Panel panel = new Panel();
        TextField field = new TextField("测试内容");
        panel.add(new Button("按钮"),BorderLayout.WEST);
        panel.add(field);
        frame.add(panel);
        frame.pack();
        frame.setVisible(true);
    }
}
